home *** CD-ROM | disk | FTP | other *** search
- on LoadGame
- global SNAME, UNAME, alert, puppetSprite, value, init, JOBS, ACTION, J, TWNS, DEST_LQDS, KAT_LQDS, RANS, WANS, DTQR, DTQW, KARM, LIVC, SEX, CASH, EXCF, PNM, YY, MM, DD, DAYS, DEPDD, AFDD, TRAVEL, GameFileName, LPDAY, ARRIVE_CASH, PHONE_M, AUKT_JOBS
- if the machineType = 256 then
- openXLib(the pathName & "FILEIO.DLL")
- set FILE to FileIO(mnew, "?read", "bpd")
- else
- if the machineType <> 256 then
- set FILE to FileIO(mnew, "?read", "BPdr")
- end if
- end if
- if not objectp(FILE) then
- ErrorH(FILE)
- exit
- end if
- set S to FILE(mReadLine)
- if not S contains "BackPacker Game - version 1.0" then
- ErrorH(999)
- exit
- end if
- set SNAME to FILE(mReadLine)
- delete char length(SNAME) of SNAME
- set UNAME to FILE(mReadLine)
- delete char length(UNAME) of UNAME
- set SEX to value(FILE(mReadLine))
- set CASH to value(FILE(mReadLine))
- set EXCF to value(FILE(mReadLine))
- set ACTION to value(FILE(mReadLine))
- set LIVC to value(FILE(mReadLine))
- set RRFCC to value(FILE(mReadLine))
- set YY to value(FILE(mReadLine))
- set MM to value(FILE(mReadLine))
- set DD to value(FILE(mReadLine))
- set DTQR to value(FILE(mReadLine))
- set DTQW to value(FILE(mReadLine))
- set LQNO to value(FILE(mReadLine))
- set RANS to value(FILE(mReadLine))
- set WANS to value(FILE(mReadLine))
- set KARM to value(FILE(mReadLine))
- set DAYS to value(FILE(mReadLine))
- set DEPDD to value(FILE(mReadLine))
- set AFDD to value(FILE(mReadLine))
- set TRAVEL to value(FILE(mReadLine))
- set ARRIVE_CASH to value(FILE(mReadLine))
- set PHONE_M to value(FILE(mReadLine))
- set AUKT_JOBS to value(FILE(mReadLine))
- set GameFileName to FILE(mFileName)
- FILE(mdispose)
- if the machineType = 256 then
- closeXLib(the pathName & "FILEIO.DLL")
- end if
- if not CodeMachine(J, "Decode", RRFCC) then
- ErrorH(666)
- set TRAVEL to 0
- exit
- end if
- set LPDAY to DAYS
- MakeLists()
- set EXCF to getAt(EXCF_S, getLast(TWNS))
- if (getAt(TWNS, 1) = getLast(TWNS)) and (abs(TRAVEL) >= 24) then
- ErrorH(555)
- set TRAVEL to 0
- exit
- end if
- go("GameLoaded")
- end
-
- on ErrorH ErrMess
- if ErrMess = -43 then
- nothing()
- else
- if ErrMess = -49 then
- alert("Kan ikke erstatte gamle filer!")
- else
- if ErrMess < 0 then
- alert("Problem med å lese filen!")
- else
- if ErrMess = 555 then
- alert("Denne BackPacker-turisten har allerede reist jorden rundt en gang!")
- else
- if ErrMess = 666 then
- alert("Dette BackPacker-dokumentet er korrupt og kan ikke brukes!")
- else
- if ErrMess = 999 then
- alert("Dette er ikke et kompatibelt BackPacker-dokument!")
- end if
- end if
- end if
- end if
- end if
- end if
- end
-